home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 958 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.7 KB  |  63 lines

  1. Path: news.mountain.net!usenet
  2. From: gene_heskett@wvlink.mpl.com (Gene Heskett)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: File system access
  5. Date: 13 Jan 96 01:59:40 +0500
  6. Organization: MountainNet, Inc. Morgantown WV 800.444.1458
  7. Message-ID: <2369.6586T119T2041@wvlink.mpl.com>
  8. References: <1996Jan12.145401.22978@ludens>
  9. NNTP-Posting-Host: slip4.mpl.com
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  g> cs321702@student.uq.edu.au (Rod Jackson) wrote:
  13.  
  14. >> Does anyone know of a way to access a file that is already 'used' by 
  15. >> another program. [...]
  16.  
  17.  g> This must be a sort of hack.
  18.  g> As I know SHARED and EXCLUSIVE file accesses have been created because
  19.  g> of safety considerations. Just imagine that you let two programs write
  20.  g> into the same file at the same time... And guess what the result will
  21.  g> be. Is this rule really worth hacking? 
  22.  
  23.  g>     Genie
  24.  
  25. Gene Heskett replies:
  26.  
  27. Unforch, not that I know of in AmigaDos. Which BTW, I *do* consider to be a
  28. semi-major shortcoming of it. I have, sitting on the next table, a machine
  29. which can run its assembler which is generating a listing of an assembly in
  30. progress. I can go to another window or monitor (doesn't matter) and start
  31. the text lister *on that same listing file*, it will catch up with the
  32. assembler and play follow the leader to the end of the listing.
  33.  
  34. I can also copy a transient file used by the compiler to another filename
  35. so that I can see if the compiler is doing what I told it to, without
  36. bothering the compiler.  Since I'm in the process of copying said file,
  37. when the compiler attempts to delete it cause its done with it, the delete
  38. only reduces the link count, which since I have it open is still one. When
  39. I close out the copy, the opsys finds the link count is now zero and
  40. deletes it. The compilers progress is *not* held till my copy is done.
  41.  
  42. These are *very handy* functions IMHO, comparable to the invention of
  43. sliced bread or bottles to put beer in!
  44.  
  45. Once in 50 blue moons, the list maker will write to exactly the end of a
  46. sector, dump it to disk, and release the "lock" *on that sector* without
  47. first issueing a lock on the next sector.  The lister then will fall by the
  48. generator, see an apparent eof and exit.  Normally it just sleeps till the
  49. lock on the next sector it wants to read has been released.
  50.  
  51. I'll leave it to you to guess which machine and operating system that is.
  52. Hint: Not PC or Mac. Normally shipped with Motorola cpu, often replaced
  53. with a Hitachi. Production and sales discontinued for 9 years now.
  54.  
  55. Cheers
  56.  
  57. /*            Gene Heskett          |  These opinions are NOT to be  */
  58. /*  CE @ WDTV Weston/Clarksburg WV  |  confused with the official    */
  59. /*  <gene_heskett@wvlink.mpl.com>   |  WDTV managment views          */
  60. #include <std.disclaimer>
  61.  
  62.  
  63.